#include<cstdio>//uncle-lu
#include<cstring>

char ch[5010];

int main()
{
	int cnt = 1;
	char c;
	while(c = getchar())
	{
		if(c == 'E')break;
		if(c == 'W')ch[cnt++]=c;
		if(c == 'L')ch[cnt++]=c;
	}

	int count=1, W=0, L=0;
	for(int i=1;i<=cnt;i++,count++)
	{
		if((W >= 11 && W-L >= 2)||(L >= 11 && L-W >=2))
		{
			count = 1;
			printf("%d:%d\n",W,L);
			W = 0;
			L = 0;
		}
		if(ch[i]=='W')W++;
		if(ch[i]=='L')L++;
	}

	if(W != 0 || L != 0)
	{
		printf("%d:%d\n",W,L);
		W = 0;
		L = 0;
	}

	printf("\n");

	count = 1;
	for(int i=1;i<=cnt;++i,count++)
	{
		if((W >= 21 && W-L >= 2)||(L >= 21 && L-W >=2))
		{
			count = 1;
			printf("%d:%d\n",W,L);
			W = 0;
			L = 0;
		}
		if(ch[i]=='W')W++;
		if(ch[i]=='L')L++;

	}

	if(W != 0 || L != 0)
	{
		printf("%d:%d\n",W,L);
		W = 0;
		L = 0;
	}

	return 0;
}
